package com.by.controller;

import com.by.bean.Enquiry;
import com.by.common.bean.ResultBean;
import com.by.common.controller.BaseController;
import com.by.service.EnquiryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "客户询价")
@RequestMapping("/v1")
public class EnquiryController extends BaseController {
    @Autowired
    EnquiryService enquiryService;


    @ApiOperation("保存询价单")
    @PostMapping("/enquiry")
    public ResultBean save(@RequestBody Enquiry enquiry){
        int rs=enquiryService.save(enquiry);
        return saveResult(rs);
    }
}
